{% extends "default.html" %}

{% block content %}
<div class="title">
	Administraci&oacute;n de Clientes
</div>
<div class="content">
	<div>Administraci&oacute;n de clientes registrados</div>
	<table id="client_table">
		<tr>
			<th>Nombres</th>
			<th>Apellidos</th>
			<th>NIT</th>
		</tr>
		{% if request.clients %}
			{% for c in request.clients %}
				<tr>
					<td><a href="/staff/clients/{{ c.id }}/">{{ c.user.first_name }}</td>
					<td>{{ c.user.last_name }}</a></td>
					<td>{{ c.nit }}</td>
				</tr>
			{% endfor %}
		{% else %}
		<tr>
			<td>No se han registrado clientes</td>
		</tr>
		{% endif %}
	</table>
	<div>Ingrese la siguiente informaci&oacute;n para registrar a un cliente</div>
	<form action="/staff/clients/register/" method="post">
		<table id="client_register">
			<tr>
				<th>Nombres</th>
				<td><input type="text" name="firstname"></td>
			</tr>
			<tr>
				<th>Apellidos</th>
				<td><input type="text" name="lastname"></td>
			</tr>
			<tr>
				<th>NIT</th>
				<td><input type="text" name="nit"></td>
			</tr>
			<tr>
				<td colspan="2">
					<input type="submit" value="Registrar">
				</td>
			</tr>
		</table>
	</form>
</div>
{% endblock %}